;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; HW7 blocks world + painting (stub)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(define (domain hw6)
  (:requirements :strips)

  (:constants 
	Red
	)
	
  (:predicates 
	;;(on ?x ?y)
	(on-table ?x)
	;;(clear ?x)
	(arm-empty)
	(holding ?x)
	(color ?x ?c)
	(clean ?brush)
	(paint ?x ?c)
  )	 
  
(:action load-brush-with-color
	     :parameters (?brush ?can)
	     :precondition ( and (holding ?brush)
						(clean ?brush)
						(on-table can)
						(paint can Red))
	     :effect
	     (and (color ?brush  Red)))
		 
(:action brush-paint
	     :parameters (?brush ?blockA)
	     :precondition ( and (holding ?brush)
						(on-table blockA)
						(color ?brush  Red))
	     :effect
	     (and (color ?blockA  Red)))
	   
(:action pickup
	     :parameters (?brush)
	     :precondition (and (on-table ?brush)
						(arm-empty))
	     :effect
	     (and (holding ?brush)
		   (not(arm-empty))
		   (not(on-table ?brush))))
		   
(:action put-down
	     :parameters (?brush )
	     :precondition (and (holding ?brush) (not(arm-empty)))
	     :effect
	     (and (not (holding ?brush))
		   (arm-empty)
		   (on-table ?brush))))


